﻿@using CloverNet.Authorization.Demo.Manager.Models;
@using CloverNet.Common.Extensions;
@{
    ViewBag.Title = "PermissionList";
}

@helper ShowPermission()
    {
        var i = 0;
        foreach (Permission permission in EnumDescriptor.GetEnumList<Permission>())
        {
            <tr @(i % 2 == 0 ? "class='success'" : "")>
                <td>
                    @(i + 1)
                </td>
                <td>
                    @permission.ToString()
                </td>
                <td>
                    @permission.GetDescription()
                </td>
            </tr>
            i++;
        }
    }


<h2>PermissionList</h2>

<div class="container">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <table class="table table-hover table-striped">
                <thead>
                    <tr>
                        <th>
                            编号
                        </th>
                        <th>
                            编号
                        </th>
                        <th>
                            名称
                        </th>
                    </tr>
                </thead>
                <tbody>
                    @ShowPermission()
                </tbody>
            </table>
        </div>
        <a href="#" class="btn btn-primary active" role="button">Primary link</a>
        <a href="#" class="btn btn-default active" role="button">Link</a>
    </div>
</div>


